import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { UserQuery, UserPageVO } from "./types";

/**
 * 获取用户分页列表
 *
 * @param queryParams
 */
export function getUserPage(
  queryParams: UserQuery
): AxiosPromise<PageResult<UserPageVO[]>> {
  return request({
    url: "/admin/member/user/pageList",
    method: "post",
    data: queryParams,
  });
}

// 修改余额
export function changeBalance(data: any) {
  return request({
    url: "/admin/member/userBalance/changeBalance",
    method: "post",
    data
  });
}

// 添加用户
export function addUser(data: any) {
  return request({
    url: "/admin/member/user/add",
    method: "post",
    data
  });
}
